<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加图书</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        .form-container {
            width: 50%;
            margin: 50px auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .form-container h2 {
            text-align: center;
        }
        .form-container form {
            display: flex;
            flex-direction: column;
        }
        .form-container label {
            margin-top: 10px;
            font-weight: bold;
        }
        .form-container input, .form-container select {
            padding: 10px;
            margin-top: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        .form-container button {
            margin-top: 20px;
            padding: 10px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        .form-container button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<div class="form-container">
    <h2>添加图书</h2>
    <form action="addBookServlet" method="post">
        <label for="bookName">图书名称:</label>
        <input type="text" id="bookName" name="bookName" required>

        <label for="category">图书类别:</label>
        <select id="category" name="category" required>
            <option value="">请选择类别</option>
            <option value="文学">文学</option>
            <option value="科技">科技</option>
            <option value="历史">历史</option>
            <option value="艺术">艺术</option>
            <option value="其他">其他</option>
        </select>

        <label for="author">作者:</label>
        <input type="text" id="author" name="author" required>

        <label for="publisher">出版社:</label>
        <input type="text" id="publisher" name="publisher" required>

        <label for="language">语言:</label>
        <input type="text" id="language" name="language" required>

        <label for="price">价格:</label>
        <input type="number" step="0.01" id="price" name="price" required>

        <label for="publish_date">出版日期:</label>
        <input type="date" id="publish_date" name="publish_date" required>

        <button type="submit">添加图书</button>
    </form>
</div>
</body>
</html>
